{% set clazz = "order-search" %}
{% set title = "订单搜索" %}
{% extends './modules/common/templates/main.html' %}
{% block style %}
  <link rel="stylesheet" type="text/css" href="{{ '/static/css/store.css'|version }}" />
{% endblock %}
{% block content %}
  {% if !nested %}
    <header class="bar bar-header">
      {{ macro.back() }}
      <h1 class="title">{{ title }}</h1>
    </header>
  {% endif %}
  <section>
    <div class="list">
      <label class="item item-input">
        <i class="icon text-gray">&#xe60a;</i>
        <span class="control">
          <form action="/store/ordersearch/result" method="get">
            <input type="search" name="keyWord" placeholder="收货人姓名/手机号/订单编号">
          </form>
        </span>
      </label>
    </div>
    {% if keyWords.length %}
      <div class="keywords-block">
        <div class="list">
          <div class="item-divider text-dark">历史搜索</div>
          {% for text in keyWords %}
            <a href="/store/ordersearch/result?keyWord={{text}}" class="item">
              <span class="text">{{text}}</span>
            </a>
          {% endfor %}
        </div>
        <div class="hspace vspace" ui-mode="20px">
          <button data-role="clearKeywords" class="button primary tiny light">清空搜索历史</button>
        </div>
      </div>
    {% endif %}
  </section>
{% endblock %}
{% block script %}
  {% parent %}
  <script src="{{ '/static/js/store.js'|version }}"></script>
{% endblock %}